package cn.likole.oj.bean;

import org.nutz.dao.entity.annotation.Column;
import org.nutz.dao.entity.annotation.Id;
import org.nutz.dao.entity.annotation.Many;
import org.nutz.dao.entity.annotation.Table;

import java.util.List;

/**
 * 任务表
 */
@Table("task")
public class Task {

    /**
     * 任务编号
     */
    @Id
    private int taskId;

    /**
     * 是否可用
     */
    @Column
    private boolean valid;

    /**
     * 任务类型
     */
    @Column
    private int type;//类型

    /**
     * 任务名称
     */
    @Column
    private String title;

    /**
     * 任务描述
     */
    @Column
    private String content;

    /**
     * 前置任务id
     */
    @Column
    private int preId;

    /**
     * 任务配置信息
     */
    @Many(field = "taskId")
    List<TaskConfig> taskConfigs;

    /**
     * 任务奖励
     */
    @Many(field = "taskId")
    List<TaskReward> taskRewards;

    public List<TaskConfig> getTaskConfigs() {
        return taskConfigs;
    }

    public void setTaskConfigs(List<TaskConfig> taskConfigs) {
        this.taskConfigs = taskConfigs;
    }

    public List<TaskReward> getTaskRewards() {
        return taskRewards;
    }

    public void setTaskRewards(List<TaskReward> taskRewards) {
        this.taskRewards = taskRewards;
    }

    public int getPreId() {
        return preId;
    }

    public void setPreId(int preId) {
        this.preId = preId;
    }

    public int getTaskId() {
        return taskId;
    }

    public void setTaskId(int taskId) {
        this.taskId = taskId;
    }

    public boolean isValid() {
        return valid;
    }

    public void setValid(boolean valid) {
        this.valid = valid;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }
}
